<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/quality/testdetail/Quality_TestDetail.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/quality/testdetail/Quality_TestDetail.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'QualityTestDetailId',
                footer: "Foots",
                cnName: '质检明细表',
                name: 'testdetail/Quality_TestDetail',
                url: "/Quality_TestDetail/",
                sortName: "TestDetailNum"
            });
            const editFormFields = ref({"TestDetailNum":"","TestDetailNumOK":"","TestDetailNumNo":"","Qualityinspector":"","Detailedremarks":"","TestDetailResult":""});
            const editFormOptions = ref([[{"title":"质检数量","field":"TestDetailNum","type":"text"}],
                              [{"title":"合格数量","field":"TestDetailNumOK","type":"text"}],
                              [{"title":"不合格数量","field":"TestDetailNumNo","type":"text"}],
                              [{"title":"质检人","required":true,"field":"Qualityinspector","type":"text"}],
                              [{"title":"备注","required":true,"field":"Detailedremarks","type":"text"}],
                              [{"title":"质检结果","required":true,"field":"TestDetailResult","type":"text"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'TestDetailNum',title:'质检数量',type:'int',width:110,align:'left',sort:true},
                       {field:'TestDetailNumOK',title:'合格数量',type:'int',width:110,align:'left'},
                       {field:'TestDetailNumNo',title:'不合格数量',type:'int',width:110,align:'left'},
                       {field:'Qualityinspector',title:'质检人',type:'string',width:180,require:true,align:'left'},
                       {field:'Detailedremarks',title:'备注',type:'string',width:180,require:true,align:'left'},
                       {field:'TestDetailResult',title:'质检结果',type:'string',width:180,require:true,align:'left'},
                       {field:'QualityTestDetailId',title:'质检明细主键Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'QualityTestMaterialId',title:'原料质检Id',type:'guid',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
